import request from '@/utils/request'
export function addOrder(data) {
  return request({
    url: 'tms/order/add',
    method: 'post',
    data: data
  })
}


export function requestOrderId(query) {
  return request({
    url: 'tms/order/requestOrderId',
    method: 'get',
    params: query
  })
}

//查询订单列表
export function listOrderInfo(data) {
  return request({
    url: 'tms/order/list',
    method: 'get',
    params: data
  })
}

//取消订单
export function cancelOrder(orderId) {
  return request({
    url: 'tms/order/' + orderId,
    method: 'delete',
  })
}

//更新订单
export function updateOrder(data) {
  return request({
    url: 'tms/order/update',
    method: 'put',
    data: data
  })
}
//根据orderId查询订单信息
export function getOrderDetail(orderId) {
  return request({
    url: 'tms/order/orderInfo/' + orderId,
    method: 'get',
  })
}

//删除货物信息
export function deleteGoods(goodsInfo) {
  return request({
    url: 'tms/order/delGoods/',
    method: 'get',
    params: goodsInfo
  })
}

//查询顾客信息
export function getCustomerInfo() {
  return request({
    url: 'tms/order/customerInfo/',
    method: 'get',
  })}
